<template>
  <div id="aliplayer"></div>
</template>
 
<script>
import Aliplayer from 'aliplayer';
 
export default {
  name: 'MyAliPlayer',
  mounted() {
    const player = new Aliplayer({
      "id": "aliplayer",
      "width": "100%",
      "height": "500px",
      "cover": "https://img.alicdn.com/tps/TB1EXIhOFXXXXcIaXXXXXXXXXXX-760-340.jpg",
      "source": "//player.alicdn.com/video/editor.mp4",
      "autoplay": false,
      "mediaType": "video"
    }, function(player){
      console.log('播放器创建好了。')
    });
  }
}
</script>
 
<style>
/* 样式按需添加 */
#aliplayer {
  width: 100%;
  height: 500px;
}
</style>